package com.wx.sys.service;

import com.wx.sys.model.WxAccount;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by king-pc on 2018/12/6.
 */
@RequestMapping("/wxAccountApi")
@FeignClient(value = "wx-provider-sys")
public interface WxAccountFeignApi {

    /**
     * 保存微信公号账户信息
     * @param wxAccount
     * @return
     */
    @PostMapping("/addAccount")
    public int addAccount(@RequestBody WxAccount wxAccount);

    /**
     * 查询用户绑定的公众号信息
     * @param userId
     * @return
     */
    @PostMapping("/getWxAccountByUserId")
    public WxAccount getWxAccountByUserId(@RequestParam("userId") String userId);
}
